public abstract class SubObject {
    public static final int LIVE = 0;
    public static final int Dead=1;
    protected int state = LIVE;
    protected int width;
    protected int height;
    protected int x;
    protected int y;
    protected int speed;

    /**
     *写给英雄的构造方法，宽高多种图片不固定，传参写活
     *
     */
    public SubObject(int width, int height, int x, int y, int speed) {
        this.state = state;
        this.width = width;
        this.height = height;
        this.x = x;
        this.y = y;
        this.speed = speed;
    }

    //移动方法
    public abstract void step();
}
